Memory system and method of controlling nonvolatile memory

ABSTRACT

According to one embodiment, a memory system includes a nonvolatile memory and a controller. The controller manages a plurality of namespaces for storing a plurality of kinds of data having different update frequencies. The controller encodes write data by using first coding for reducing wear of a memory cell to generate first encoded data, and generates second encoded data to be written to the nonvolatile memory by adding an error correction code to the first encoded data. The controller changes the ratio between the first encoded data and the error correction code based on the namespace to which the write data is to be written.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. application Ser.No. 14/948,649 filed Nov. 23, 2015, which is based upon and claims thebenefit of priority from Japanese Patent Application No. 2015-45713,filed Jul. 23, 2015, the entire contents of each are incorporated hereinby reference.

FIELD

Embodiments described herein relate generally to technology ofcontrolling a nonvolatile memory.

BACKGROUND

Recently, memory systems comprising nonvolatile memories have becomewidespread.

As one of these memory systems, a NAND-flash technology basedsolid-state drive (SSD) is known. Because of their low-power-consumptionand high-performance, SSDs are used as the main storage of variouscomputers.

As the type of SSDs, the SSDs include a small-capacity, high-speed SSDsuch as a single-level-cell SSD(SLC-SSD), and a large-capacity SSD, suchas a multi-level-cell SSD (MLC-SSD) and P triple-level-cell SSD(TLC-SSD).

Normally, in a data center, these kinds of SSDs are used selectivelyaccording to the use.

However, it becomes a cause of increasing a Total Cost of Ownership(TCO) of the data center if SSDs for dedicated use according to the typeof data are employed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration example of a memorysystem according to one embodiment.

FIG. 2 is an illustration for describing the relationship between anordinary hierarchical storage system and a non-hierarchical storagesystem.

FIG. 3 is an illustration for describing a plurality of tiers which areset within the memory system of the embodiment.

FIG. 4 is an illustration for describing the relationship between aplurality of areas in the memory system of the embodiment and datawritten to these areas.

FIG. 5 is an illustration for describing namespace management of thememory system of the embodiment.

FIG. 6 is an illustration for describing an extended namespacemanagement command applied to the memory system of the embodiment.

FIG. 7 is an illustration showing a sequence of physical resourceallocation processes executed by the memory system of the embodiment.

FIG. 8 is a flowchart showing steps of a physical resource allocationprocess executed by the memory system of the embodiment.

FIG. 9 is a flowchart showing steps of a write command sending processexecuted by a host connected to the memory system of the embodiment.

FIG. 10 is an illustration for describing a write command applied to thememory system of the embodiment.

FIG. 11 is an illustration showing a process sequence of a writeoperation executed by the memory system of the embodiment.

FIG. 12 is an illustration for describing a process of controlling theratio between an endurance code and an ECC, which is executed by thememory system of the embodiment.

FIG. 13 is an illustration for describing an encoding process and adecoding process executed by the memory system of the embodiment.

FIG. 14 is a block diagram showing a configuration example of anendurance code encoder within the memory system of the embodiment.

FIG. 15 is a flowchart showing steps of the encoding process executed bythe memory system of the embodiment.

FIG. 16 is a flowchart showing steps of a write control process executedby the memory system of the embodiment.

FIG. 17 is an illustration for describing a garbage collection operationand a copy destination free block allocation operation which areexecuted by the memory system of the embodiment.

FIG. 18 is an illustration for describing a write data amount countingprocess executed by the memory system of the embodiment.

FIG. 19 is a flowchart showing steps of the write data amount countingprocess executed by the memory system of the embodiment.

FIG. 20 is a flowchart showing steps of a write amplification (WA)calculation process executed by the memory system of the embodiment.

FIG. 21 is an illustration showing an example of return data transmittedto a host from the memory system of the embodiment.

FIG. 22 is a flowchart showing steps of a counter reset process executedby the memory system of the embodiment.

FIG. 23 is an illustration showing an extended garbage collectioncontrol command which is applied to memory system of the embodiment.

FIG. 24 is a flowchart showing steps of a garbage collection operationexecuted by the memory system of the embodiment.

FIG. 25 is an illustration showing the structure or a flash arrayapplied to the memory system of the embodiment.

FIG. 26 is an illustration showing the structure or a flash arraystorage of the embodiment.

FIG. 27 is an illustration showing another structure of a flash arraystorage of the embodiment.

FIG. 28 is an illustration for describing the relationship between atotal capacity of each SSD within the flash array storage of theembodiment and the amount of physical resources which should beallocated to each tier.

FIG. 29 is an illustration for describing a write operation of the flasharray storage of the embodiment.

FIG. 30 is block diagram showing a configuration example of a host ofthe embodiment.

FIG. 31 is an illustration showing a configuration example of a computerincluding the memory system and the host of the embodiment.

DETAILED DESCRIPTION

In general, according to one embodiment, a memory system includes anonvolatile memory and a controller. The controller manages a pluralityof names aces for storing a plurality of kinds of data having differentupdate frequencies. The controller encodes write data by using firstcoding for reducing wear of a memory cell to generate first encodeddata, and generates second encoded data to be written to the nonvolatilememory by add ng an error correction code to the first encoded data. Thecontroller changes the ratio between the first encoded data and theerror correction code based on the namespace to which the write data isto be written.

First, referring to FIG. 1, a configuration of an information processingsystem 1 including a memory system according to one embodiment will bedescribed.

This memory system is a semiconductor storage device configured to writedata to a nonvolatile memory, and read data from the nonvolatile memory.The memory system is realized as, for example, a NAND-flash solid-statedrive (SSD) 3.

The information processing system 1 includes a host (a host device) 2,and the SSD 3. The host 2 is an information processing apparatus such asa server or a personal computer.

The SSD 3 may be used as a main storage of an information processingapparatus which functions as the host 2. The SSD 3 may be accommodatedin the information processing apparatus or connected to the informationprocessing apparatus via a cable or a network.

As an interface for interconnecting the host 2 and the SSD 3, SCSI,Serial Attached SCSI (SAS), ATA, Serial ATA (SATA), PCI Express (PCIe),Ethernet (registered trademark), Fiber Channel, etc., may be used.

The SSD 3 comprises a controller 4, a nonvolatile memory (a NAND memory)5, and a DRAM 6. Although the type of the NAND memory 5 is not limited,it may include a plurality of NAND flash memory chips.

The NAND memory 5 includes a number of NAND blocks (physical blocks) B0to Bm-1. Each of physical blocks B0 to Bm-1 serves as an erase unit. Thephysical block may be referred to as a “block” or “erase block”.

Physical blocks B0 to Bm-1 include many pages (physical pages). That is,each of physical blocks B0 to Bm-1 includes pages P0 to Pn-1. In theNAND memory 5, reading and writing of data are executed by the page.Erasing of data is executed by the physical block.

The controller 4 is electrically connected to the NAND memory 5, whichis a nonvolatile memory, via a NAND interface 13 such as a Toggle andONFI. The controller 4 may function as a flash translation layer (FTL)configured to execute management of data in the NAND memory 5 (datamanagement), and management of blocks in the NAND memory 5 (blockmanagement).

The data management includes, for example, (1) management of mappinginformation showing the relationship between logical block addresses(LBAs) and physical addresses, and (2) a process for concealing theread/write per page and the erase operation per block. The management ofmapping between LBAs and the physical addresses is executed by using alook-up table (LUT) 33. The physical address corresponding to a certainLBA indicates the storage location within the NAND memory 5 to which thedata of this LBA is written. The physical address includes a physicalpage address and a physical block address. The physical page address isassigned to all pages and the physical block address is assigned to allphysical blocks.

Writing of data to a page is enabled only once per erase cycle.

Accordingly, the controller 4 maps the write (overwrite) to the same LBAto a different page in the NAND memory 5. That is, the controller 4writes the data to this different page. Further, the controller 4updates the look-up table (LUT) 33 and associates this LBA with thedifferent page, and also invalidates the original page (the old datawith which this LBA was associated).

The block management includes management of bad blocks, wear leveling,garbage collection, etc. The wear leveling is an operation for levelingthe program/erase cycles for each of the physical blocks.

The garbage collection is an operation for creating a free space in theNAND memory 5. The garbage collection operation copies all items ofvalid data in several target blocks in which the valid data and invaliddata are mixed to another block (for example, a free block), in order toincrease the number of free blocks in the NAND memory 5. Further, thegarbage collection operation updates the look-up table (LUT) 33, andmaps each of the LBAs of the copied valid data to a correct physicaladdress. A block which includes only the invalid data as the valid datahas been copied to another block is opened as a free block. In this way,this block can be used again after erasure.

The host 2 sends a write command to the SSD 3. The write commandincludes a logical address (a starting logical address) of the writedata (that is, the data to be written), and a transfer length. In thisembodiment, while an LBA is used as the logical address, in the otherembodiment, an object ID may be used as a logical address. The LBA isrepresented by a serial number assigned to a logical sector (size: 512bytes, for example). The serial number starts with zero. The controller4 of the SSD 3 writes the write data specified by the starting logicaladdress (starting LBA) and the transfer length in the write command to aphysical page of a physical block in the NAND memory 5. Further, thecontroller 4 maps the LBAs corresponding to the written data to physicaladdresses corresponding to physical storage locations at which this datais written be u dating the look-up table (LUT) 33.

Next, a configuration of the controller 4 will be described.

The controller 4 includes a host interface 11, a CPU 12, the NANDinterface 13, a DRAM interface 14, an SRAM 15, etc. The CPU 12, the NANDinterface 13, the DRAM interface 14, and the SRAM 15 are interconnectedvia a bus 10.

The host interface 11 receives various commands from the host 2 (a writecommand, a read command, an extended namespace management command, anextended garbage collection control command, an UNMAP command, etc.).

The write command requests the SSD 3 to write data specified by thiswrite command. The write command includes an LBA of the first logicalblock to be written, and the transfer length (the number of logicalblocks). The read command requests the SSD 3 to read data specified bythis read command. The read command includes an LBA of the first logicalblock to be read, and the transfer length (the number of logicalblocks).

The extended namespace management command is an extended command of anordinary namespace management command.

Generally, what host software can specify is only the number of logicalblock addresses (LBAs) for a namespace, and the number of physicalblocks (a nonvolatile memory capacity) which should actually beallocated to this namespace cannot be specified. That is, normally, thesize of the namespace is based on the number of LBAs requested in thatnamespace creation operation. In an ordinary SSD, the number of physicalblocks allocated for the namespace is determined by a controller withinthe SSD. For example, if the size corresponding to the number of LBAsrequired for the namespace is 90 MB, and the capacity of one physicalblock is 100 MB, an ordinary SSD controller may allocate one physicalblock for this namespace. Alternatively, if the size corresponding tothe number of LBAs required for the namespace is 120 MB, and thecapacity of one physical block is 100 MB, the ordinary SSD controllermay allocate two physical blocks for this namespace. However, with suchan SSD-dependent physical block allocation method, host software cannotrequest the SSD to create individual namespaces having differentfeatures (endurance).

The extended namespace management command can specify not only thenumber of logical block addresses (LBAs) for a namespace to the SSD 3,but also the number of physical blocks which should be allocated forthis namespace to the SSD 3. That is, the extended namespace managementcommand includes a parameter indicative of the amount of physicalresources (the number of physical blocks) which should be secured forthe namespace to be created. The extended namespace management commandenables the host 2 (the host software) to secure a sufficient number ofphysical blocks suitable for a workload in the host 2 for each of thenamespaces. Normally, the more the number of physical blocks allocatedto the namespace is, the more the endurance of the namespace can beincreased. Accordingly, by using the extended namespace managementcommand, the host software can create each of namespaces havingdifferent features (endurance).

The extended garbage collection control command is an extended commandof a host-initiated garbage collection command for controlling thegarbage collection operation of the SSD 3 by the host 2. The extendedgarbage collection control command can specify the namespace to begarbage-collected to the SSD 3. That is, the extended garbage collectioncontrol command includes a parameter indicative of a target namespacefor which the garbage collection is to be executed.

The CPU 12 is a processor configured to control the host interface 11,the NAND interface 13, the DRAM interface 4, and the SRAM 15. The CPU 12executes a command process, etc., for processing various commands fromthe host 2 in addition to a process of the aforementioned FTL.

These FTPL process and command process may be controlled by firmwareexecuted by the CPU 12. The firmware causes the CPU 12 to function as anamespace control unit 21, a write amplification calculation unit 22, agarbage collection operation control unit 23, and a wear/retentioncontrol unit 24.

The namespace control unit 21 has a multi-namespace management functionfor managing multiple namespaces. The namespace corresponds to a kind ofarea within the NAND memory 5, which is a nonvolatile memory. Thenamespace control unit 21 creates multiple namespaces based on requestsfor creating the namespaces from the host 2, respectively. In otherwords, the namespace control unit 21 logically divides the NAND memory 5into a plurality of areas (namespaces), on the basis of each of requestsfor creating the namespaces from the host 2. The host 2 can request theSSD 3 to create each of namespaces by using the aforementioned extendednamespace management command. The namespace control unit 21 allocatesone or more physical blocks whose number has been specified by the host2 with respect to these individual areas (namespaces). These areas(namespaces) are used to store several kinds of data having differentupdate frequencies, respectively.

For example, data of the type which is frequently updated (hot data) iswritten to a specific area (tier) for storing the hot data. The hot datamay be referred to as dynamic data. Data of the type whose frequency ofupdate is low (cold data) is written to another specific area (tier) forstoring the cold data. The cold data may be referred to as non-dynamicdata or static data.

That is, while the SSD 3 is a single storage device physically, areaswithin the SSD 3 serve as storages of different tiers.

These areas are associated with the namespaces, respectively.Accordingly, by merely associating the hot data with an ID of a specificnamespace and associating the cold data with an ID of another specificnamespace, the host software can easily specify the areas (tiers) towhich these kinds of data should be written.

If an environment is that the hot data and the cold data are mixed inthe same physical block, the write amplification may be significantlyincreased.

This is because in a physical block in which the hot data and the colddata are mixed, while only a part of the data in the physical block isinvalidated early by the update of the hot data, the remaining dataportion (the cold data) in this physical block may be kept in a validstate for a long time.

The write amplification (WA) is defined as follows:WA=(Total amount of data written to SSD)/(Total amount of data writtento SSD from host)

The total amount of data written to SSD, above, corresponds to the sumof the total amount of data written to the SSD from the host and thetotal amount of data written to the SSD internally by the garbagecollection, etc.

An increase in the write amplification (WA) leads to an increase in thenumber of times of rewrites (the number of program/erase cycles) of eachof the physical blocks in the SSD 3. That is, the greater the writeamplification (WA) is, the faster the program/erase cycles of thephysical block reaches its upper limit. This causes degradation in theendurance and life of the SSD 3.

If the physical block is filled with only the hot data, it is verylikely that all of data in this block will be invalidated relativelyearly by the update of those data. Accordingly, this block can be reusedby simply deleting the block without executing the garbage collection.

Meanwhile, if the physical block is filled with only the cold data, allof the data in this block is kept in the valid state for a long time.Accordingly, it is very probable this block will not become a target ofgarbage collection.

In the present embodiment, several kinds of data having different updatefrequencies are written to different areas (different namespaces). Forexample, the hot data is written to an area associated with a certainnamespace (NS #1), and the cold data is written to another areaassociated with another specific namespace (NS #n). Accordingly, asituation in which the hot data and the cold data are mixed in the samephysical block can be prevented from occurring. This enables thefrequency of executing the garbage collection operation to be reduced,and as a result, the write amplification can be reduced.

Further, in the present embodiment, the namespace control unit 21allocates a desired number of physical blocks to the areas (namespaces)individually, on the basis of a request from the host 2 specifying thenumber of physical blocks to be secured for each of the namespaces.

For example, when the host 2 demands a new namespace to be created, thehost 2 sends an extended namespace management command including aparameter indicative of the number of physical blocks which should besecured for the target namespace to the hid 3. The namespace controlunit 21 creates the namespace (NS #1), and allocates physical blockswhose number is specified by the parameter to this names pace (the areaassociated with this namespace).

The host 2 repetitively sends the extended namespace management commandto the SSD 3 while updating the value of the parameter indicative of thenumber of physical blocks which should be secured for the targetnamespace. As a result, a plurality of namespaces (areas) are created,and the NAND memory 5 is logically divided into these areas.

Accordingly, it is possible to optimally allocate the physical resources(the number of physical blocks) of the NAND memory 5 to multiple areas(multiple tiers), on the basis of the sizes (the number of LBAs) ofindividual areas and the endurance which should be set for each of theseareas.

The write amplification calculation unit 22 calculates the writeamplification of each of the namespaces (each of the areas), not thewrite amplification of the entire SSD 3. In this way, the writeamplification calculation unit 22 can provide the write amplificationcorresponding to each namespace (each area) to the host 2.

The garbage collection operation control unit 23 executes the garbagecollection operation per namespace (per area thereby preventing the hotdata and the cold data from being mixed in the same physical block. Morespecifically, when the garbage collection operation control unit 23receives an extended garbage collection control command from the host 2,the garbage collection operation control unit 23 selects physicalblocks, which are the target of the garbage collection, from thephysical blocks which are allocated to the target namespace specified bythe extended garbage collection control command. Further, the garbagecollection operation control unit 23 executes the garbage collectionoperation of copying the valid data from the target physical blocks to acopy destination free block.

Further, the garbage collection operation control unit 23 manages thesefree blocks created by the garbage collection operation executed foreach of the namespaces as shared free blocks shared among thesenamespaces. That is, these free blocks are shared among the namespaces.The garbage collection operation control unit 23 selects a free blockhaving the least number of program/erase cycles from the free blocks.Further, the garbage collection operation control unit 23 allocates theselected free block to a copy destination free block in an areacorresponding to the target namespace described above.

Normally, the program/erase cycles of a free block created by thegarbage collection operation of an area for cold data are far less thanthose of a free block created by the garbage collection operation or anarea for hot data. This is because once a certain amount of cold datahas been written to an area for cold data, in most cases, this cold datais not frequently updated or rarely updated. Meanwhile, the number ofprogram/erase cycles of a free block created by the garbage collectionoperation of an area for hot data is commonly relatively high.Accordingly, the above-mentioned operation of allocating a free blockhaving the least number of program/erase cycles to a copy destinationfree block enables the block with a small number of program/erase cyclesused in the area for cold data to be automatically allocated to an areafor hot data.

The wear/retention control unit 24 executes an operation for optimizinga tradeoff between reliability (data retention) and endurance (DWPDvalue) by controlling the ratio between a code for reducing the wear ofa memory cell and an error correction code (ECC). In this way, it ispossible to increase the endurance of an area for hot data, and also toextend the data retention (retention time of written data) of an areafor cold data.

The NAND interface 13 is a NAND controller configured to control theNAND memory 5 under the control of the CPU 12.

The DRAM interface 14 is a DRAM controller configured to control theDRAM 6 under the control of the CPU 12.

A part of a storage area of the DRAM 6 may be used as a write buffer(WB) 31 for temporarily storing data to be written to the NAND memory 5.Further, the storage area of the DRAM 6 may be used as a GC buffer 32for temporarily storing data which is moved during the garbagecollection (GC) operation. Furthermore, the storage area of the DRAM 6may be used for storing the above-mentioned look-up table 33. Thelook-up table 33 may be divided into a plurality of look-up tables (LUT#1, LUT #2, . . . ) corresponding to the namespaces, respectively, sothat the garbage collection (GC) operation independent for each of thenamespaces can be executed.

Next, a configuration of the host 2 will be described.

The host 2 is an information processing apparatus which executes variousprograms. Programs which are executed by the information processingapparatus include an application software layer 41, an operating system42, and a file system 43.

As is generally known, the operating system 42 is software configured tomanage the entire host 2, control the hardware within the host 2, andexecute the control so that an application can use the hardware and theSSD 3.

The file system 43 is used for controlling the operation (creation,saving, update, deletion, etc.) of a file. For example, ZFS, Btrfs, XFS,ext4, NTFS, etc., may be used as the file system 42.

Alternatively, a file object system (for example, Ceph Object StorageDaemon), or a key value store system (for example Rocks DB) may be usedas the file system 42.

Various application software threads run on the application softwarelayer 41. Examples of the application software threads are clientsoftware, database software, virtual machine, etc.

When the application software layer 41 needs to send a request such as aread command or a write command to the SSD 3, the application softwarelayer 41 sends the request to the OS 42. The OS 42 sends that request tothe file system 43. The file system 43 translates that request into acommand (a read command, a write command, etc.). The file system 43sends the command to the SSD 3. When a response from the SSD 3 isreceived, the file system 43 sends that response to the OS 42. The OS 42sends that response to the application software layer 41.

In the present embodiment, the host 2 smartly manages and controls theSSD 3 by using the above-described extended namespace managementcommand, extended garbage collection control command, etc. For example,a case where a tier management module 44 of the file system 43 needs tocreate a namespace (an area) for hot data and a namespace (an area) forcold data is assumed. The tier management module 44 sends an extendednamespace management command including a parameter indicative of thenumber of physical blocks which should be allocated to the namespace(area) for hot data to the SSD 3. When a response including an ID ofthis namespace is received from the SSD 3, the tier management module 44manages the ID of this namespace as a namespace ID for hot data. Next,the tier management module 44 sends an extended namespace managementcommand including a parameter indicative of the number of physicalblocks which should be allocated to the namespace (area) for cold datato the SSD 3. When a response including an ID of this namespace isreceived from the SSD 3, the tier management module 44 manages the ID ofthis namespace as a namespace ID for cold data.

When it is necessary to write a certain kind of hot data to the SSD 3,the tier management module 44 sends a write command including anamespace ID for hot data to the SSD 3. When it is necessary to write acertain kind of cold data to the SSD 3, the tier management module 44sends a write command including a namespace ID for cold data to the SSD3.

When it is necessary to read a certain kind of hot data, the tiermanagement module 44 sends a read command including a namespace ID forhot data to the SSD 3. When it is necessary to read a certain kind ofcold data, the tier management module 44 sends a read command includinga namespace ID for cold data to the SSD 3.

FIG. 2 shows the relationship between an ordinary hierarchical storagesystem and a non-hierarchical storage system.

In the hierarchical storage system shown on the left side of FIG. 2,three types of SSDs are used suitably according to the purpose. The SSDfor tier T1 is a small-capacity, high-speed SSD. The small-capacity,high-speed SSD may be, for example, an SLC-SSD which stores one-bitinformation per memory cell. Accordingly, the SSD for tier T1 is anexpensive SSD.

The SSD for tier T1 is used as a storage for data having high frequencyof access (read/write), that is, data which is frequently updated, forexample. Examples of data whose frequency of access is high includemetadata of a file system. The metadata includes various kinds ofmanagement information such as a storage location of data in a file, thedate and time this data was created, the date and time this data wasupdated, and the data and time this data was read. Accordingly, thefrequency of access to the metadata (i.e., the frequency of write accessand the frequency of read access) is extremely high. Thus, the SSD fortier T1 used for storing the metadata is required to have highendurance.

As one index indicating the endurance of an SSD, the number of drivewrites per day (DWPD) is known. For example, DWPD=10 means that for anSSD having a total capacity of 1 TB, writing of 10 TB (=10×1 TB) of dataper day can be executed every day for five years. The SSD for tier T1may be required to have an endurance of DWPD=10.

The ratio of the capacity of tier T1 to the capacity of the entirehierarchical storage system is, for example, 1%. This is because thesize of the metadata is extremely small as compared to the size of thecontents of the file.

The SSD for tier 12 is a medium-capacity SSD. The medium-capacity SSDmay be, for example, an MIC-SSD which stores two-bit information permemory cell. The SSD for tier 12 is used as a storage for data which isless frequently updated than the metadata. The SSD for tier 12 may berequired to have an endurance of DWPD=1. The ratio of the capacity oftier T2 to the capacity of the entire hierarchical storage system is,for example, 4%.

The SSD for tier T3 is a low-cost, large-capacity SSD. Thelarge-capacity SSD may be, for example, an MIC-SSD or a TLC-SSD. The SSDfor tier 13 is used as storage for data which is rarely updated. It maybe sufficient for the SSD for T3 to have low durability of DWPD=0.1 orso. The ratio of the capacity of tier T3 to the capacity of the entirehierarchical storage system is, for example, 95%.

The right side or FIG. 2 shows an example of a non-hierarchical storagesystem which stores all the data of three tiers T1 to T3 in a singleSSD. The DWPD required for the entire non-hierarchical storage systemcan be obtained as follows:DWPD=(10×0.01)+(1×0.04)+(0.1×0.95)=0.235

Accordingly, if a non-hierarchical storage system is applied, while thecapacity required for a single SSD is drastically increased, theendurance required for the SSD is reduced. In order to realize alow-cost, large-capacity SSD, it is suitable to employ an MLC-SSD or aTLC-SSD. While the write speed of the MLC-SSD/TLC-SSD is lower than thatof the SLC-SSD, the read speed of the MLC-SSD/TLC-SSD is approximatelythe same as that of the SLC-SSD. Accordingly, even in a non-hierarchicalstorage system which uses only one SSD of low-cost and large-capacity,by adding the function of optimizing the endurance relationship betweentiers within this SSD, it is possible to obtain endurance andperformance that are substantially equivalent to those of a hierarchicalstorage system.

FIG. 3 shows an example of allocating physical resources among areas(namespaces) in the SSD 3 (SSD #1) of the present embodiment.

The storage space of SSD #1 is logically divided into areas 51, 52, 53,54, and 55 for storing several kinds of data (hot data, warm data, tepiddata, cool data, and cold data) having different frequencies of update,respectively, for example.

The data is classified into five data groups (hot data, warm data, tepiddata, cool data, and cold data) according to the frequency of update.The frequency of updating the data is decreased in the order of hotdata, warm data, tepid data, cool data, and cold data. The warm data,tepid data, and cool data are data having an intermediate level offrequency of update between the hot data and the cold data.

Area 51 is used as a tier storage (tier #1) for storing hot data. Anamespace (NS #1) is associated with area 51. Area 51 is used forstoring the hot data (active data) having a small capacity and a highupdate frequency. An example of the ratio of the capacity of area 51 tothe total capacity of SSD #1 may be 1%. An example of the DWPD requiredfor area 51 may be 10.

Area 52 is used as a tier storage (tier #2) for storing warm data. Anamespace (NS #2) is associated with area 52. An example of the ratio ofthe capacity of area 52 to the total capacity of SSD #1 may be 2%. Anexample of the DWPD required for area 52 may be 3.

Area 53 is used as a tier storage (tier #3) for storing tepid data. Anamespace (NS #3) is associated with area 53. An example of the ratio ofthe capacity of area 53 to the total capacity of SSD #1 may be 3%. Anexample of the DWPD required for area 53 may be 1.

Area 54 is used as a tier storage (tier #4) for storing cool data. Anamespace (NS #4) is associated with area 54. An example of the ratio ofthe capacity of area 54 to the total capacity of SSD #1 may be 14%. Anexample of the DWPD required for area 54 may be 0.3.

Area 55 is used as a tier storage (tier #n) for storing cold data. Anamespace (NS #n) is associated with area 55. Area 55 is used forstoring the cold data (non-active data) having a large capacity and alow update frequency. An example of the ratio of the capacity of area 55to the total capacity of SSD #1 may be 80%. For example, the frequencyof updating area 55 is approximately 1/100^(th) the frequency ofupdating area 51. Accordingly, an example of the DWPD required for area55 may be 0.1.

As described above, the hot data, warm data, tepid data, cool data, andcold data are stored in different areas, respectively. Thus, it ispossible to prevent occurrence of a situation in which items of datahaving different frequencies of update, for example, the hot data andthe cold data, are mixed in the same physical block. As a result, it ispossible to reduce write amplification of the SSD 3.

When physical resources are allocated to areas 51 to 55 at the ratioshown in FIG. 3, the DWPD required for the SSD 3 (SSD #1) as a whole canbe obtained as follows:DWPD=(10×0.01)+(3×0.02)+(1×0.03)+(0.3×0.14)+(0.1×0.8)=0.312

This means that in principle, the SSD 3 (SSD #1) logically divided intoareas 51 to 55 can be realized by a large-capacity, low-cost SSD.

In the present embodiment, as described above, the host 2 can specifythe number of physical blocks to be secured for each of the namespaces,and the SSD 3 can allocate a specified number or physical blocks toindividual areas (tiers) separately.

If tiers are realized by different SSDs, unless the SSDs themselvesbeing used are replaced, it is not possible to change the sizes ofindividual tiers. In the present embodiment, the same SSD is logicallydivided into a plurality of tiers (areas).

Accordingly, the sizes of individual tiers can be optimized inaccordance with the workload and the endurance which should be set foreach tier (area).

That is, in the present embodiment, the number of physical blocks whichshould be allocated to areas 51 to 55 can be determined by the controlof the host 2 for each of the areas.

For example, the host software can request the SSD 3 to allocate asufficient number of physical blocks exceeding the expected total amountof hot data (the user data capacity) with respect to area 51 (tier #1)for hot data. In response to this request, the controller 4 of the SSD 3allocates a specified number of physical blocks dedicated to area 51(tier #1) for hot data to this area 51 (tier #1) for hot data. Forexample, when the expected total amount of hot data (the user datacapacity) is 100 GB, the host software may request allocation ofphysical blocks equivalent in number to 200 GB. In this case, thecontroller 4 allocates that number of physical blocks equivalent to 200GB to area 51 (tier #1). As a result, physical blocks equivalent innumber to twice the capacity of a user area of area 51 (tier #1) areallocated for area (tier #1). The physical resources of 100 GB, which isthe remainder when the capacity of the user area is subtracted from 200GB, serve as an over-provision area of area 51 (tier #1).

Here, the over-provision area will be described.

Over-provisioning means allocating a storage capacity within the SSD 3which is not visible to the host 2 as an available user space (a useraccessible LBA space). A space in which a storage capacity which is notvisible to the host 2 as the user accessible LBA space is allocated isthe overprovision area. By the over-provisioning, physical blocks havingthe capacity exceeding the user accessible LBA space (the user areacapacity) are allocated.

In an ordinary SSD, while a host can specify the number of LBAs for acertain namespace, the number of physical blocks which should beallocated for this namespace cannot be specified. Also, normally, onlyone over-provision area is set within a single SSD.

In contrast, in the present embodiment, it is possible to allocatephysical blocks whose respective numbers are specified by the host 2 tothe namespaces individually, and moreover, to enable an over-provisionarea of a desired capacity to be set for each of the areas as aconsequence.

For example, the total capacity of area 51 (the total capacity of NS #1)is determined by the total number of physical blocks allocated to area51. Area 51 includes a user area 51 a and an over-provision area 51 b.The remainder when the capacity of the user area 51 a is subtracted fromthe total capacity of area 51 serves as the over-provision area 51 b.The user area 51 a is a group of physical blocks allocated to the LBAs.By the presence of the over-provision area 51 b, the endurance andperformance of the user area 51 a in area 51 is improved.

Similarly, in each of the other areas, the remainder when the capacityof the user area in the corresponding area is subtracted from thecapacity determined by the total number of physical blocks allocated tothis area serves as the over-provision area in this area.

Likewise area 51 for hot data, also for area 52 (tier #2) for warm data,the host software can request the SSD 3 to allocate physical blockswhose number exceeds the expected total amount of warm data (the userarea capacity). In response to this request, the controller 4 of the SSD3 allocates a specified number of physical blocks dedicated to area 52for warm data to this area 52 (tier 42) for warm data. For example, whenthe expected total amount of warm data (the user data capacity) is 200GB, and allocation of physical blocks equivalent in number to 250 GB isrequested by the host software, the controller 4 allocates that numberof physical blocks equivalent to 250 GB to area (tier #2). As a result,physical resources that are greater than the capacity of the user areaof area 52 (tier #2) by 50 GB are allocated to area 52 (tier #2). Thephysical resources of 50 GB, which is the remainder when the capacity ofthe user area is subtracted from the physical resources of 250 GB, serveas an over-provision area of area 52 (tier #2).

Similarly, the host software specifies the quantity of physical blocksto be allocated for each of the remaining areas.

For example, the host software can request the SSD 3 to allocate aminimum number of physical blocks determined in consideration of theexpected total amount of cold data (the user data capacity) with respectto area 55 (tier #n) for cold data. In response to this request, thecontroller 4 allocates a specified number of physical blocks dedicatedto area 55 (tier #n) for cold data to this area 55 (tier #n) for colddata. For example, when the expected total amount of cold data (the userdata capacity) is 8000 GB, and allocation of physical blocks equivalentin number to 8001 GB is requested by the host software, the controller 4allocates that number of physical blocks equivalent to 8001 GB to area55 (tier #n). As a result, physical resources that are greater than thecapacity of the user area of area 55 (tier #n) by 1 GB are allocated toarea 55 (tier #n). The physical resources of 1 GB, which is theremainder when the user data capacity is subtracted from the physicalresources of 8001 GB, serve as an over-provision area of area 55 (tier#n).

As described above, the SSD 3 allocates a specified number of physicalblocks to each of the areas based on a request from the host 2specifying the number of physical blocks to be secured for each of thenamespaces. As a result, the ratio between the capacity of theover-provision area and the capacity of the user area can be optimizedfor each of the areas. For example, the number of physical blocks to beallocated to each area may be adjusted such that the higher the tier is,the more the over-provision area to be allocated is increased. In thiscase, the ratio of the capacity of the over-provision area in area 55 tothe capacity of the user area in area 55 is less than the ratio of thecapacity of the over-provision area in area 51 to the capacity of theuser area in area 51.

In area 51, by the use of a large-size over-provision area, the writeamplification of area 51 can be reduced efficiently. This is becauseeven if physical blocks of the user area 51 a of area 51 are filled withdata of 100 MB, and as a consequence, none of these physical blocksincludes an available page without erasing or the blocks, physicalblocks of the over-provision area 51 b can be used in a write of thedata instead of the physical blocks of the user area 51 a. Thereby,timing at which the garbage collection operation of area 51 is executedcan be delayed adequately. As data is written to the physical blocks ofthe over-provision area 51 b, the data in the physical blocks of theuser area 51 a is invalidated by the update. Physical blocks in whichall of data are invalidated can be reused without performing the garbagecollection of those physical blocks.

Accordingly, since it is possible to efficient reduce the writeamplification of area 51, the program/erase cycles of the physicalblocks of area 51 can be reduced. This means that the endurance of area51 can be improved.

Since the over-provision area of area 55 is small, the writeamplification of area 55 is increased. However, the frequency ofupdating area 55 for cold data is far less than that of updating area 51for hot data. For example, the frequency of updating area 55 for colddata is approximately one out of a hundred of the frequency of updatingarea 51 for not data. That is, while area 51 is rewritten one hundredtimes, area 55 is rewritten only once, and thus, the number ofprogram/erase cycles of each of the physical blocks of area 55 for colddata is extremely small. Accordingly, with respect to area 55 for colddata, even if write amplification of that area is significant, aphenomenon in which the program/erase cycles of physical blocks of area55 for cold data soon reach the upper limit of the program/erase cyclesof the SSD 3 does not occur.

FIG. 4 shows the relationship between areas 51 to 55 and the data to bewritten to areas 51 to 55.

The NAND memory 5 is logically divided into areas 51 to 55 correspondingto namespaces NS #1 to NS #5. Write data associated with an ID ofnamespace NS #1 (NSID=1), that is, the hot data, is written to area 51.Write data associated with an ID of namespace NS #2 (NSID=2), that is,the warm data, is written to area 52. Similarly, write data associatedwith an ID of namespace NS #n (NSID=n), that is, the cold data, iswritten to area 55.

FIG. 5 shows namespace management by the SSD 3.

Here, a case where a plurality of namespaces NS #1 to NS #n are createdis assumed. Logical address space (LBA space) A1 of 0 to E0 is allocatedto namespace NS #1. Logical address space (LBA space) A2 of 0 to E1 isallocated to namespace NS #2. Similarly, logical address space (LEAspace) An of 0 to En is allocated to namespace NS #n.

In the present embodiment, a look-up table LUT is divided for each ofthe namespaces. That is, n look-up tables LUT #1 to LUT #n correspondingto namespaces NS #1 to NS #n are managed by the controller 4 of the SSD3.

Look-up table LUT 41 manages mapping between LBAs of namespace NS #1(i.e., LBA space A1) and physical addresses of the NAND memory 5.Look-up table LUT #2 manages mapping between LBAs of namespace NS #2(i.e., LBA space A2) and physical addresses of the NAND memory 5.Look-up table LUT in manages mapping between LBAs of namespace NS #n(i.e., LBA space An) and physical addresses of the NAND memory 5.

The controller 14 can perform the garbage collection operationindependently for each of the namespaces (areas) by using look-up tablesLUT #1 to LUT #n.

Management data 100 may hold information indicating the relationshipbetween namespaces NS #1 to NS #n and the number of physical blocksallocated to each of these namespaces NS #1 to NS #n.

In the present embodiment, free blocks created by the garbage collectioncan be shared among namespaces NS #1 to NS #n.

FIG. 6 shows an extended namespace management command.

The extended namespace management command is used for namespacemanagement including creation and deletion of a namespace. The extendednamespace management command includes the following parameters:

(1) Creation/deletion

(2) LBA range

(3) Physical resource size

(4) Tier attribute (optional)

The value 0 h of the creation/deletion parameter requests creation of anamespace to the SSD 3. The value 1 h of the creation/deletion parameterrequests deletion of a namespace to the SSD 3. When deletion of anamespace is requested, a parameter indicating the ID of the namespaceto be deleted is set to the extended namespace management command.

The LBA range parameter indicates the LBA range (LBA 0 to n-1) of thenamespace. This LBA range is mapped to a user area of the namespace.

The physical resource size parameter indicates the number of physicalblocks to be secured for a namespace.

In another embodiment, instead of the physical resource size parameter,the extended namespace management command may include a parameterindicative of the size of over-provision.

The over-provision size parameter indicates the number of physicalblocks to be secured for an over-provision area within the areaassociated with the namespace. If the extended namespace managementcommand includes a parameter corresponding to the size of theover-provision, the SSD 3 may create a namespace and allocate physicalblocks whose number specified by this parameter to an over-provisionarea within the area associated with this namespace.

The tier attribute parameter indicates a tier attribute corresponding tothis namespace. The relationship between the value of the tier attributeparameter and the tier attribute is as follows:

000: Hot

001: Warm

010: Tepid.

011: Cool

100: Cold

FIG. 7 shows a sequence of physical resource allocation processesexecuted by the host 2 and the SSD 3.

The host 2 sends an extended namespace management command requestingcreation of a namespace (an area for hot data) to the SSD 3. Thisextended namespace management command includes a physical resource sizeparameter specifying the number of physical blocks to be secured for thearea for hot data. Since the capacity of one physical block within theSSD 3 is reported to the host 2 from the SSD 3, the host 2 can requestthe number of physical blocks suitable for the area for hot data. Inresponse to receipt of the extended namespace management command, thecontroller 4 of the SSD 3 creates namespace NS #1 and locates aspecified number of physical blocks to this namespace NS #1 (step S11).The controller 4 sends a response indicating completion of the commandto the host 2. This response may include the ID of the creatednamespace.

The host 2 sends an extended namespace management command requestingcreation of the next namespace (an area for warm data) to the SSD 3.This extended namespace management command includes a physical resourcesize parameter specifying the number of physical blocks to be securedfor the area for warm data. In response to receipt of the extendednamespace management command, the controller 4 of the SSD 3 createsnamespace NS #2 and allocates a specified number of physical blocks tothis namespace NS #2 (step S12). The controller 4 sends a responseindicating completion of the command to the host 2. This response mayinclude the ID of the created namespace.

Similarly, the other namespaces (an area for tepid data and an area forcool data) are created.

Further, the host 2 sends an extended namespace management commandrequesting creation of a next namespace (an area for cold data) to theSSD 3. This extended namespace management command includes a physicalresource size parameter specifying the number of physical blocks to besecured for the area for cold data. In response to receipt of theextended namespace management command, the controller 4 of the SSD 3creates namespace NS #n and allocates a specified number of physicalblocks to this namespace NS #n (step S13). The controller 4 sends aresponse indicating completion of the command to the host 2. Thisresponse may include the ID of the created namespace.

As described above, by repeating the process of creating a namespacewhile allocating a specified number of physical blocks to the namespace,the NAND memory 5 is logically divided into a plurality of areas, and aspecified number of physical blocks are allocated to each of the areas.

The flowchart of FIG. 8 shows steps of a physical resource allocationprocess executed by the SSD 3.

The controller 4 of the SSD 3 receives an extended namespace managementcommand from the host 2 (step S21). The controller 4 determines whetherthe extended namespace management command requests creation of anamespace based on the creation/deletion parameter in the extendednamespace management command (step S22).

If the extended namespace management command requests creation of anamespace (YES in step S22), the controller 4 determines whetherphysical blocks whose number is specified by the physical resourceparameter in the extended namespace management command can be secured,on the basis of the number of remaining physical blocks in the freeblocks (step S23).

If the number of remaining physical blocks is greater than or equal tothe specified number (YES in step S23), the controller 4 creates anamespace and allocates the specified number of physical blocks to anarea associated with this namespace (step S24). The controller 4notifies the host 2 of completion of the command (step S25).

If the number of remaining physical blocks is less than the specifiednumber (NO in step S23), the controller 4 notifies the host 2 of anerror (step S26). The host 2 which received a report of the error maychange the number of physical blocks to be secured. Alternatively, thehost 2 which received a response of the error may start over again onthe process of creating each of the namespaces while specifying thenumber of physical blocks to be secured for each of the namespaces.

The flowchart of FIG. 9 shows steps of a write command sending processexecuted by the host 2.

When a request to write data is made (YES in step S31), the host 2classifies this write data (data to be written) into one of hot data,warm data, tepid data, cool data, and cold data (step S32). The host 2may classify the write data (the data to be written) into one of hotdata, warm data, tepid data, cool data, and cold data according to thetype of the data, such as whether it is metadata or the contents of thefile.

If the write data is hot data (YES in step S33), the host 2 sends awrite command including the ID of the namespace for hot data (NSID #1)to the SSD 3 (step S36).

If the write data is warm data (YES in step S34), the host 2 sends awrite command including the ID of the namespace for warm data (NSID #2)to the SSD 3 (step S37).

If the write data is cold data (YES in step S35), the host 2 sends awrite command including the ID of the namespace for cold data (NSID #n)to the SSD 3 (step S38).

FIG. 10 shows the write command.

The write command includes the following parameters:

(1) Starting LEA

(2) Number of logical blocks

(3) Namespace ID

The starting LBA parameter indicates the LBA of the first logical blockto be written.

The number of logical blocks parameter indicates the number of logicalblocks corresponding to the data to be written (that is, the transferlength).

The namespace ID parameter indicates an ID of the namespace to which thedata should be written.

FIG. 11 shows a process sequence of a write operation which is executedby the host 2 and the SSD 3.

The host 2 sends a write command to the SSD 3, and sends write data tothe SSD 3. The controller 4 of the SSD 3 writes the write data to thewrite buffer (WB) 31 (step S41), and notifies the host 2 of a responseof the command completion. After that, the controller 4 writes the writedata to an available block within an area which is associated with thenamespace specified by the namespace ID in the write command (step S42).

FIG. 12 shows a process of controlling the ratio between a code forreducing the wear of a memory cell and an error correction code (ECC) inaccordance with the namespace (area) to which the data should bewritten.

In the present embodiment, by controlling the ratio between a code forreducing the wear of a memory cell and an error correction code (ECC), atradeoff between reliability (data retention) and endurance (DWPD value)can be optimized.

Here, an outline of an operation for encoding the write data by using acode (coding) for reducing the wear of a memory cell per write will bedescribed.

First, the controller 4 of the SSD 3 encodes the write data by using acode (coding) for reducing the wear on a memory cell to generate firstencoded data (a portion indicated as “endurance code” in FIG. 12). Thiscode (coding) is used to lower the frequency of occurrence of a specificcode (a code of a high program level corresponding to a high-thresholdvoltage) which significantly wears the memory cell. An example of thecode (coding) is the aforementioned endurance code (endurance coding).

For example, in MLC, a memory cell is set to a state (a program level)corresponding to one of four levels (E-level, A-level, B-level, andC-level) corresponding to two bits. E-level is an erased state. Athreshold voltage distribution of the memory cell is raised in the orderof E, A, B, and C. C-level state is a state (a program level) whichsignificantly wears the memory cell.

In the encoding which uses a code (coding) for reducing the wear of amemory cell, a code corresponding to a specific level (for example,C-level) which significantly wears the memory cell, for example, may beconverted into another code (for example, a long bit patterncorresponding to B-B, which is two B-levels in succession).

As can be seen, in the encoding, since a specific code (a bit pattern)which wears the memory cell is replaced by another long code (anotherbit pattern), a codeword of the write data is extended. Accordingly, inthe encoding, the controller 4 may perform lossless compression of thewrite data first. Further, the controller 4 may replace each of thespecific bit patterns in the compressed write data by another long bitpattern whereby the memory cell wears less.

The controller 4 adds an error correction code (ECC) to the firstencoded data (“endurance code” in FIG. 12) obtained by the encoding,thereby creating second encoded data (data including an endurance codeand an ECC in FIG. 12), and writing this second encoded data to anavailable page in a physical block. Each page includes a data area and aredundancy area. The bit length of the second encoded data matches withthe size of a page including the data area and the redundancy area.

Further, the controller 4 automatically changes the ratio between thefirst encoded data and the error correction code (ECC) in accordancewith the area (namespace) to which the write data should be written.

The longer the first encoded data (the endurance code) is, the lower thefrequency of occurrence of a specific code which significantly wears thememory cell becomes. Therefore, the longer the first encoded data (theendurance code) is, the more the wear of the memory cell per write canbe reduced.

For example, when the write data is one which should be written to anarea for hot data, the controller 4 controls the ratio between the firstencoded data and the error correction code so that second encoded dataincluding a combination of longer first encoded data and shorter errorcorrection code can be obtained, in order to increase the endurance(DWPD) of the area for hot data. That is, in writing the hot data, anencoding method which prioritizes endurance over reliability (dataretention) is used.

Meanwhile, when the write data is one which should be written to an areafor cold data, the controller 4 controls the ratio between the firstencoded data and the error correction code so that second encoded dataincluding a combination of shorter first encoded data and longer errorcorrection code can be obtained, in order to extend the data retentionof data written to the area for cold data. That is, in writing the colddata, an encoding method which prioritizes reliability (data retention)over endurance is used.

In the present embodiment, as shown in FIG. 12, the higher the rewritefrequency (the frequency of update) of the namespace (area) is, theshorter the bit length of the ECC becomes, and instead, the longer thebit length of the first encoded data (endurance code) becomes. Also, thelower the rewrite frequency (the frequency of update) of the namespace(area) is, the longer the bit length of the FCC becomes, and instead,the shorter the bit length of the first encoded data (endurance code)becomes.

Since the number of correctable bits is increased as the bit length ofthe ECC is increased, the reliability (data retention) is improved.Normally, as time passes, a bit error rate is increased. Accordingly, anincrease in the number of correctable bits can improve the dataretention.

On the other hand, as described above, since the wear of memory cellswithin a page can be reduced as the bit length of the endurance code isincreased, the endurance can be improved.

FIG. 13 shows an encoding process and a decoding process executed by theSSD 3.

The controller 4 of the SSD 3 includes an endurance code encoder 91, anFCC encoder 92, an endurance code decoder 93, and an FCC decoder 94.

The ECC encoder 92 and the FCC decoder 94 execute an ECC encodingprocess which generates an FCC and an ECC decoding process for errorcorrection, respectively. In the ECC encoder 92, a systematic code forgenerating the ECC is used. Examples of the systematic code are aHamming code, BHC code, Reed-Solomon code, etc.

The endurance code encoder 91 and the endurance code decoder 93 executethe encoding process for reducing the wear of a memory cell and thedecoding process corresponding to the encoding process. In the endurancecode encoder 91, in order to generate the first encoded data, anendurance code, which is a non-systematic code, is used. In theendurance code encoder 91, as described above, a specific code whichsignificantly wears the memory cell (a bit pattern corresponding toC-level, for example) is converted into another long code (for example,a long bit pattern corresponding to B-B). That is, this encoding processis an extension process of extending the codeword.

FIG. 14 is a configuration example of the endurance code encoder 91.

The endurance code encoder 91 includes an entropy analysis circuit 911,a compression circuit 912, a search circuit 914, a replacement circuit915, a code length checking circuit 916, an output circuit 917, etc.

The entropy analysis circuit 911 obtains the number of occurrences (or aprobability of occurrence) of each of the bit patterns which occur inthe write data. The compression circuit 912 creates a code book 913based on a result of analysis of the entropy analysis circuit 911, andperforms lossless compression of the write data by using the code book913. The code book 913 shows the relationship between each of the bitpatterns which occur in the write data and a conversion codecorresponding to each of these bit patters. The compression circuit 912allocates a short conversion code to a bit pattern which occurs manytimes.

The search circuit 914 searches compressed data (compressed write data)starting from, for example, the most significant bit, in pursuit of aspecific code which significantly wears the memory cell. The specificcode may be a bit pattern corresponding to C-level, for example. Thereplacement circuit 915 replaces the specific code searched by thesearch circuit 914 with another long code (for example, a long bitpattern corresponding to B-B). In this way, a specific code in thecompressed data is converted into another long code whereby the memorycell wears less. The replacement circuit 915 updates the code book 913,thereby replacing a specific conversion code in the code book 913corresponding to the above specific code with another long code asmentioned above.

The code length checking circuit 916 checks the code length (the bitlength) of the current compressed data. If the code length (the bitlength) of the current compressed data is less than a predeterminedthreshold (a target bit length), a process of searching and replacing isrepeated. In this way, the code length of the current compressed data isoptimized.

The target bit length is changed adaptively in accordance with thenamespace (area) to which the write data should be written. Accordingly,the higher the rewrite frequency (the frequency of update) of thenamespace (area) is, the longer the bit length of the encoded data(endurance code) becomes. In other words, the lower the rewritefrequency (the frequency of update) of the namespace (area) is, theshorter the bit length of the encoded data (endurance code) becomes.

The output circuit 917 outputs compressed data having an optimized bitlength as the first encoded data (endurance code). The code book 913 maybe added to the first encoded data.

The flowchart of FIG. 15 shows steps of an encoding process for reducingthe wear of a memory cell.

The controller 4 obtains the number of occurrences of several bitpatterns in the write data, and sorts these bit patterns in descendingorder of the number of occurrences of the bit patterns (step S1). Thecontroller 4 creates the code book 913 including conversion codes forcompressing respective bit patterns based on a result of entropyanalysis, and performs lossless compression of the write data by usingthe code book 913 (step S2).

The controller 4 generates the encoded data by encoding this compresseddata with a code for reducing the wear of a memory cell.

In this case, the controller 4 searches for a certain code (a specificbit pattern) which wears the memory cell from the compressed data (stepS3). The controller 4 converts the searched code (bit pattern) intoanother long code (bit pattern) whereby the memory cell wears less (stepS4). The controller 4 updates the conversion code in the code bookcorresponding to this specific code which has been searched (step S5).

The controller 4 determines whether the bit length of the currentcompressed data (encoded data) is greater than the target bit length(step S6). The target bit length is determined in advance in accordancewith the namespace (area) to which the data should be written. Forexample, a long target bit length is used for data (hot data) whichshould be written to namespace NS #1, and a short target bit length isused for data (cold data) which should be written to namespace NS #n.

If the bit length of the current compressed data (encoded data) is lessthan the target bit length, the process of steps S3 to S5 is executedagain. The more the process of steps S3 to S5 is repeated, the more thefrequency of occurrence of a specific code (a bit pattern correspondingto C-level, for example) which significantly wears the memory cell canbe lowered. The bit length of the encoded data is increased accordingly.

If the bit length of the current compressed data (encoded data) hasbecome greater than the target bit length (YES in step S6), thecontroller 4 adds the code book at the end, for example, of the encodeddata (step S7).

The flowchart of FIG. 16 shows steps of a write control process executedby the SSD 3.

The controller 4 of the SSD 3 determines the attribute of the receivedwrite data, more specifically, the tier attribute of the namespace(area) to which this write data should be written. Further, inaccordance with a result of this determination, an encoding method forencoding the write data is changed. A change in the encoding method isexecuted by controlling the ratio between the endurance code and theECC.

That is, when the controller 4 of the SSD 3 receives a write commandfrom the host 2 (YES in step S101), the controller 4 determines the tierattribute (hot/warm/tepid/cool/cold) of a target namespace (area)specified by the namespace ID in the write command (step S102). The tierattribute of the target namespace (area) may be determined on the basisof the size of the over-provision area of the target namespace (area)(the ratio between the user area and the over-provision area, etc.).Alternatively, if the extended namespace management command whichrequests creation of a target namespace includes the tier attributeparameter, the controller 4 may determine the tier attribute indicatedby this tier attribute parameter as being a tier attribute of the targetnamespace. Alternatively, the write command may include a parameterindicative of the tier attribute of the target namespace in addition tothe ID of the target namespace.

For example, if the tier attribute of the target namespace is hot (YESin step S103), that is, the write data is associated with an ID ornamespace NS #1, the controller 4 encodes the write data by using anencoding method which prioritizes endurance over reliability bycontrolling the ratio between the endurance code and the ECC (stepS104). With the encoding method described above, the write data isencoded to data including a combination of a longer endurance code and ashorter ECC. The controller 4 writes the encoded data to an availablepage of the physical block in area 51 (step S105).

For example, if the tier attribute of the target namespace is cold (YESin step S106), that is, the write data is associated with an ID ofnamespace NS #n, the controller 4 encodes the write data by using anencoding method which prioritizes reliability over endurance bycontrolling the ratio between the endurance code and the ECC (stepS107). With the encoding method described above, the write data isencoded to data including a combination of a shorter endurance code anda longer ECC. The controller 4 writes the encoded data to an availablepage of the physical block in area 55 (step S108).

FIG. 17 shows the garbage collection operation and the copy destinationfree block allocation operation executed by the SSD 3.

As described above, the garbage collection operation is executed foreach of the namespaces. In the garbage collection operation of namespaceNS #1, the controller 4 of the SSD 3 selects physical blocks, which arethe target of the garbage collection, from the physical blocks (activeblocks) within area 51 associated with namespace NS #1. For example, thecontroller 4 may specify several top physical blocks having a relativelyhigh ratio of invalid data by referring to look-up table LUT #1, andselect these physical blocks as the physical blocks to begarbage-collected.

The controller 4 manages a free block pool (a free block list) 60including free blocks shared among the namespaces. The controller 4selects a free block with the least number of program/erase cycles fromthe free blocks. The controller 4 allocates the selected free block as acopy destination free block B1000 to namespace NS #1. The controller 4copies all of the valid data to the copy destination free block B1000from physical blocks (blocks B0 to B3 in this case), which are thetarget of garbage collection. Further, the controller 4 updates thelook-up table LUT #1 and maps the valid data to the copy destinationfree block B1000. Physical blocks B0 to B3, which are the target ofgarbage collection, become free blocks which do not contain valid data.These free blocks are moved to the free block pool 60.

The garbage collection operation is executed similarly for the othernamespaces (NS #2 to NS #n).

For example, in the garbage collection operation of namespace NS #n, thecontroller 4 selects physical blocks, which are the target of thegarbage collection, from the physical blocks (active blocks) within area55 associated with namespace NS #n. For example, the controller 4 mayspecify several top physical blocks having a relatively high ratio ofinvalid data by referring to look-up table LUT #n, and select thesephysical blocks as the physical blocks to be garbage-collected.

The controller 4 selects a free block with the least number ofprogram/erase cycles from the free blocks. The controller 4 allocatesthe selected free block as a copy destination free block B1001 tonamespace NS #n. The controller 4 copies all of the valid data to thecopy destination free block B1001 from physical blocks (blocks B2000 toB2003 in this case), which are the target of garbage collection.Further, the controller 4 updates the look-up table LUT #n and maps thevalid data to the copy destination free block B1001. Physical blocksB2000 to B2003, which are the target of garbage collection, become freeblocks which do not contain valid data. These free blocks are moved tothe free block pool 60.

As described above, since the update frequency of namespace NS #n is farless than that of namespace NS #1, the number of program/erase cycles ofa free block created by the garbage collection of namespace NS #n issmall. Therefore, in the garbage collection operation of the presentembodiment, when garbage collection of namespace NS #1 is executed, aphysical block used in namespace NS #n in the past is allocated fornamespace NS #1 as a copy destination free block. Accordingly, aphysical block having a small number of program/erase cycles which hasbeen used in namespace NS #n can be reused in namespace NS #1effectively. Consequently, the endurance of namespace NS #1 can beimproved.

Further, in order to improve the endurance of namespace NS #1, thecontroller 4 can execute a wear leveling process of interchangingphysical blocks between namespace NS #1 and namespace NS #n. Forexample, when any of the physical blocks used in namespace NS #1 had itsnumber of program/erase cycles reached a threshold number (the thresholdnumber being set to a number smaller than the upper limit of theprogram/erase cycles), the controller 4 may interchange this physicalblock with a physical block having the least number of program/erasecycles within namespace NS #n.

FIG. 18 shows a write data amount counting process executed by the SSD3.

The controller 4 of the SSD 3 can calculate write amplification of eachof the namespaces, not the write amplification or the entire SSD 3.Accordingly, the controller 4 comprises two types of counters, which area counter for counting the amount of data written by the host 2, and acounter for counting the amount of data written by the garbagecollection operation, for each of the namespaces.

Counters 61 and 62 are used for calculating the write amplification ornamespace NS #1. Counter 61 counts the amount of data written tonamespace NS #1, that is, area 51, by the host 2. Counter 62 counts theamount of data written to namespace NS #1, that is, area 51, by thegarbage collection of namespace NS #1.

Counters 63 and 64 are used for calculating the write amplification ofnamespace NS #2. Counter 63 counts the amount of data written tonamespace NS #2, that is, area 52, by the host 2. Counter 64 counts theamount of data written to namespace NS #2, that is, area 52, by thegarbage collection of namespace NS #2.

Counters 65 and 66 are used for calculating the write amplification ofnamespace NS #n. Counter 65 counts the amount of data written tonamespace NS #n, that is, area 55, by the host 2. Counter 66 counts theamount of data written to namespace NS #n, that is, area 55, by thegarbage collection of namespace NS #n.

The flowchart of FIG. 19 shows steps of the write data amount countingprocess executed by the SSD 3.

When the controller 4 of the SSD 3 has received a write command from thehost 2, the controller 4 determines the target namespace (area) to whichthe write data should be written, on the basis of the namespace IDincluded in the write command (steps S41 to S43). Further, thecontroller 4 writes the write data to the target namespace (area), andalso counts the amount of data to be written (steps S44 to S46).

For example, when the target namespace (area) is namespace NS #1 (YES instep S41), the controller 4 uses counter 61 and counts the amount ofdata written to namespace NS #1 (step S44). In step S44, a count valueat present of counter 61 may be incremented by the transfer length ofthe write data.

If the target namespace (area) is namespace NS #2 (YES in step S42), thecontroller 4 uses counter 63 and counts the amount of data written tonamespace NS #2 (step S45). In step S45, a count value at present ofcounter 63 may be incremented by the transfer length of the write data.

If the target namespace (area) is namespace NS #n (YES in step S43), thecontroller 4 uses counter 65 and counts the amount of data written tonamespace NS #n (step S46). In step S46, a count value at present ofcounter 65 may be incremented by the transfer length of the write data.

When a garbage collection operation of namespace NS #1 is executed (YESin step S51), the controller 4 uses counter 62 and counts the amount ofdata written to namespace NS #1 by this garbage collection operation(step S54). In step S54, a count value of counter 62 may be incrementedby the total amount of whole valid data in the physical blocks, whichare the target of the garbage collection operation.

When a garbage collection operation of namespace NS #2 is executed (YESin step S52), the controller 4 uses counter 64 and counts the amount ofdata written to namespace NS #2 by this garbage collection operation(step S55). In step S55, a count value of counter 64 may be incrementedby the total amount of whole valid data in the blocks, which are thetarget of the garbage collection operation.

When a garbage collection operation of namespace NS #n is executed (YESin step S53), the controller 4 uses counter 66 and counts the amount ofdata written to namespace NS #n by this garbage collection operation(step S56). In step S56, a count value of counter 66 may be incrementedby the total amount of whole valid data in the blocks, which are thetarget of the garbage collection operation.

The flowchart of FIG. 20 shows steps of a write amplification NVcalculation process executed by the SSD 3.

The controller 4 of the SSD 3 acquires the amount of data written tonamespace NS #1 by the host 2 (i.e., the count value of counter 61)(step S61). The controller 4 acquires the amount of data written tonamespace NS #1 by the garbage collection operation f namespace NS #1(i.e., the count value of counter 62) (step S62). The controller 4calculates write amplification of namespace NS #1 based on the countvalue of counter 61 and the count value of counter 62 (step S63). Writeamplification (NS #1-WA) of namespace NS #1 can be obtained as follows:NS#1-WA=(count value of counter 61+count value of counter 62)/(countvalue of counter 61)

The controller 4 acquires the amount of data written to namespace NS #2by the host 2 (i.e., the count value of counter 63) (step S64). Thecontroller 4 acquires the amount of data written to namespace NS #2 bythe garbage collection operation of namespace NS #2 (i.e., the countvalue of counter 64) (step S65). The controller 4 calculates writeamplification of namespace NE #2 based on the count value of counter 63and the count value of counter 64 (step S66). Write amplification (NS#2-WA) of namespace NS #2 can be obtained as follows:NS #2-WA=(count value of counter 63+count value of counter 64)/(countvalue of counter 63)

The controller 4 acquires the amount of data written to namespace NS #nby the host 2 (i.e., the count value of counter 65) (step S67). Thecontroller 4 acquires the amount of data written to namespace NS #n bythe garbage collection operation of namespace NS #n (i.e., the countvalue of counter 66) (step S68). The controller 4 calculates writeamplification of namespace NS #n based on the count value of counter 65and the count value of counter 66 (step S69). Write amplification (NS#n-WA) of namespace NS #n can be obtained as follows:NS #n-WA=(count value of counter 65 count value of counter 66)/(countvalue of counter 65)

When a WA GET command requesting that the write amplification of each ofthe namespaces be reported is received from the host 2 (YES in stepS70), the controller 4 sends the return data shown in FIG. 21 to thehost 2 and notifies the host 2 of the write amplification of each of thenamespaces (step S71).

The process of steps S61 to S69 may be executed in response to receiptof the WA GET command.

The flowchart of FIG. 22 shows steps of a counter reset process executedby the SSD 3.

The counter reset process is, used to provide, to the host 2, writeamplification or each namespace of the SSD 3 after a specific resetevent such as a chance in the setting of the SSD 3 has occurred. Achange in the setting of the SSD 3 may be, for example, a change in thesetting of a certain namespace or deletion of a certain namespace.Alternatively, an example of the change in the setting of the SSD 3 maybe a change in the setting of the entire SSD 3.

The SSD 3 executes the counter reset process in accordance with arequest from the host 2.

The request may be a command requesting that the counter be reset. Inresponse to receipt of this command, the SSD 3 may reset counters 61 to66 corresponding to all of the namespaces. When the command includes anamespace ID, the SSD 3 may reset only the two counters which areassociated with the namespace corresponding to the namespace ID.

Alternatively, a control command for changing the setting of a certainnamespace or setting of the entire SSD 3 may be handled as this request.A change in the setting of a certain namespace may be a change in thesize (LBA range) of the namespace or a change in the number of physicalblocks for the namespace.

Although the embodiment is not limited to the following, the steps ofthe counter reset process will be exemplified by describing a case wherethe counter reset process is executed in response to a change in thesetting of a certain namespace.

When the controller 4 receives a control command requesting that thesetting of a namespace be changed from the host 2, the controller 4determines the namespace whose setting is to be changed (i.e., thetarget namespace) on the basis of the namespace ID in the controlcommand.

If the target namespace is namespace NS #1 (YES in step S81), thecontroller 4 changes the setting of namespace NS #1 in accordance withthe parameter in the control command (step S82). The controller 4 clearsthe count values of counters 61 and 62 corresponding to namespace NS #1to zero (step S83).

If the target namespace is namespace NS #2 (YES in step S84), thecontroller 4 changes the setting of namespace NS #2 in accordance wits:the parameter in the control command. (step S85). The controller 4clears the count values of counters 63 and 64 corresponding to namespaceNS #2 to zero (step S86).

If the target namespace is namespace NS #n (YES in step S87), thecontroller 4 changes the setting of namespace NS #n in accordance withthe parameter in the control command (step S88). The controller 4 clearsthe count values of counters 65 and 66 corresponding to namespace NS #nto zero (step S89).

FIG. 23 shows an extended garbage collection (GC) control command.

As described above, the extended garbage collection (GC) control commandis used as a host-initiated garbage collection command for controllingthe garbage collection operation of an arbitrary namespace of the SSD 3by the host 2.

The extended garbage collection (GC) control command includes thefollowing parameters:

(1) Namespace ID

(2) Amount of free blocks

(3) Timer

The namespace ID parameter indicates an ID of a target namespace forwhich the garbage collection should be executed.

The amount of free blocks parameter indicates the amount of free blocks(for example, the number of free blocks) which should be secured for thetarget namespace.

The timer parameter specifies the maximum time of garbage collectionoperation.

The host 2 can request the SSD 3 to execute garbage collection of anarbitrary namespace in namespace NS #1 to namespace NS #n by using theextended garbage collection (GC) control command.

For example, the host 2 may monitor the write amplification ofindividual namespaces (areas) by transmitting a WA GET command to theSSD 3 on a regular basis. When the write amplification of a certainnamespace (area) has reached a write amplification thresholdcorresponding to this namespace, the host 2 may send an extended garbagecollection (GC) control command including a namespace ID of thisnamespace to the SSD 3.

Alternatively, if the host 2 desires data to be written to a certainnamespace (area) with favorable latency, the host 2 may send an extendedgarbage collection (GC) control command including a namespace ID of thisnamespace to the SSD 3.

In response to receipt of the extended garbage collection (GC) controlcommand from the host 2, the controller 4 of the SSD 3 executes thegarbage collection operation for securing a specified amount of freespace, which is dedicated to the target namespace. The controller 4finishes the garbage collection operation at the earlier of when aspecified amount of free space has been secured or when the maximum timehas elapsed.

The flowchart of FIG. 24 shows steps of the garbage collection operationexecuted by the SSD 3.

When the controller 4 of the SSD 3 received an extended garbagecollection (GC) control command from the host 2 (YES in step S91), thecontroller 4 executes the garbage collection operation of a targetnamespace specified by the namespace ID in the extended garbagecollection (GC) control command (step S92). In step S92, the controller4 selects several physical blocks, which are the target of the garbagecollection, from active blocks of the target namespace, and copies validdata in these selected physical blocks to a copy destination physicalblock.

The garbage collection operation is finished at the earlier of when aspecified amount of free space has been secured or when the maximum timehas elapsed (steps S93 and S94).

FIG. 25 shows the structure of a flash array storage of the presentembodiment.

The flash array storage is recognized as a single storage device by thehost 2. The flash array storage includes a plurality of SSDs, that is,SSD #1, SSD #2, SSD #3, . . . , SSD #n, which are controlled by stripingfor distributing data across the SSDs, in order to realize thelarge-capacity and high-speed feature.

Each of SSD #1, SSD #2, SSD #3, . . . , SSD #n includes a nonvolatilememory. Further, each of SSD #1, SSD #2, SSD #3, . . . , SSD #n has thenamespace management function as in the SSD 3 of the present embodiment.

In this flash array, area 51 (NS #1) is arranged to extend over SSD #1,SSD #2, SSD #3, . . . , SSD #n. That is, area 51 is striped across SSD#1, SSD #2, SSD #3, . . . , SSD #n, and includes several physical blockssecured for namespace NS #1 of SSD #1, several physical blocks securedfor namespace NS #1 of SSD #2, several physical blocks secured fornamespace NS #1 of SSD #3, and several physical blocks secured farnamespace NS #1 of SSD #n.

Area 52 (NS #2) is also arranged to extend over SSD #1, SSD #2, SSD #3,. . . , SSD #n. That is, area 52 is striped across SSD #1, SSD #2, SSD#3, . . . , SSD #n, and includes several physical blocks secured fornamespace NS #2 of SSD #1, several physical blocks secured for namespaceNS #2 of SSD #2, several physical blocks secured for namespace NS #2 ofSSD #3, and several physical blocks secured for namespace NS #2 of SSD#n.

Area 53 (NS #3) is also arranged to extend over SSD #1, SSD #2, SSD #3,. . . , SSD #n. That is, area 53 is striped across SSD #1, SSD #2, SSD#3, . . . , SSD #n, and includes several physical blocks secured fornamespace NS #3 of SSD #1, several physical blocks secured for namespaceNS #3 of SSD #2, several physical blocks secured for namespace NS #3 ofSSD 43, and several physical blocks secured for namespace NS #3 of SSD#n.

Area 54 (NS #4) is also arranged to extend over SSD #1, SSD #2, SSD #3,. . . , SSD #n. That is, area 54 is striped across SSD #1, SSD #2, SSD43, . . . , SSD #n, and includes several physical blocks secured fornamespace NS #4 of SSD #1, several physical blocks secured for namespaceNS #4 of SSD #2, several physical blocks secured for namespace NS #4 ofSSD #3, and several physical blocks secured for namespace NS #4 of SSD#n.

Area 55 (NS #n) is also arranged to extend over SSD #1, SSD #2, SSD #3,. . . , SSD #n. That is, area 55 is striped across SSD #1, SSD #2, SSD#3, . . . , SSD #n, and includes several physical blocks secured fornamespace NS #n of SSD #1, several physical blocks secured for namespaceNS #n of SSD #2, several physical blocks secured for namespace NS #n ofSSD #3, and several physical blocks secured for namespace NS #n of SSD#n.

FIG. 26 shows a hardware configuration of the flash array storageillustrated in FIG. 25.

A flash array storage 80 includes a flash array controller 81, inaddition to the above-mentioned SSD #1, SSD #2, SSD #3, . . . , SSD #n.The flash array controller 81 is configured to execute a stripingoperation for distributing (spreading) data across SSD #1, SSD #2, SSD#3, . . . , SSD #n. For example, in writing data to area 51 (NS #1), forexample, the first 4 KB of data D1 is written to an area within SSD #1corresponding to NS #1, the next 4 KB of data D2 is written to an areawithin SSD #2 corresponding to NS #1, the next 4 KB of data D3 iswritten to an area within SSD 43 corresponding to NS #1, the next 4 KBof data Dn is written to an area within SSD #n corresponding to NS #1,and the next 4 KB of data. Dn+1 is written to an area within SSD #1corresponding to NS #1.

In this way, the write data is dispersed into SSD #1, SSD #2, SSD #3, .. . , SSD #n in a predetermined data size (by the size of 4 KB). Forexample, when writing 1 MB of data to NS #1 is requested by the host 2,the data of 1 MB may be divided into data portions each having apredetermined data size (of 4 KB), and these data portions may bewritten in parallel with SSD #1, SSD #2, SSD #3, . . . , SSD #n.

As described above, since SSD #1, SSD #2, SSD #3, . . . , SSD #n areoperated in parallel, the performance for data write can be enhanced.

The flash array controller 81 may be provided within the host 2, insteadof the flash array storage 80, as shown in FIG. 27.

FIG. 28 shows the relationship between the capacity of each of the SSDsin the flash array storage 80 and the ratio of capacity allocated to acertain tier by these SSDs.

Here, tier #1 (NS #1) will be given as an instance. The host 2 sends anextended namespace management command to the flash array controller 81,and requests that physical blocks equivalent in number to 1% of thetotal capacity of the flash array storage 80 be secured for tier #1 (NS#1). The flash array controller 81 determines the number of physicalblocks which should be secured for tier #1 (NS #1) in each of the SSDsbased on the capacities of SSD #1, SSD #2, SSD #3, . . . , SSD #n.

Here, it is assumed that the capacity of SSD #1 is 100 GB, the capacityof SSD 42 is 200 GB, the capacity of SSD #3 is 1 TB, and the capacity ofSSD in is 100 GB.

The flash array controller 81 sends an extended namespace managementcommand to SSD #1, and requests SSD #1 to secure physical blocksequivalent in number to 1% of the 100-GB capacity (i.e., 1 GB) for NE#1. The flash array controller 81 sends an extended namespace managementcommand to SSD #2, and requests SSD #2 to secure physical blocksequivalent in number to 1% of the 200-GB capacity (i.e., 2 GB) for NS#1. The flash array controller 81 sends an extended namespace managementcommand to SSD #3, and requests SSD #n to secure physical blocksequivalent in number to 1% of the 1-TB capacity (i.e., 10 GB) for NS #1.The flash array controller 81 sends an extended namespace managementcommand to SSD in, and requests SSD #n to secure physical blocksequivalent in number to 1% of the 100-GB capacity (i.e., 1 GB) for NS#1.

FIG. 29 shows an example of a write operation corresponding to thecapacity allocation of FIG. 28.

By the striping control, when data is to be written to area 51 (NS #1),for example, the first 4 KB of data D1 is written to an area within SSD#1 corresponding to NS #1. The next 4 KB of data D2 and the next 4 KB ofdata D3 are written to an area within SSD #2 corresponding to NS #1. Thenext data D3 to D13 are written to an area within SSD #3 correspondingto NS #1. The next 4 KB of data D14 is written to an area within SSD incorresponding to NS #1, and the next 4 KB of data D15 is written to anarea within SSD #1 corresponding to NS #1.

FIG. 30 shows a hardware configuration example of an informationprocessing apparatus which functions as the host 2.

This information processing apparatus is realized as a server computeror a personal computer. The information processing apparatus includes aprocessor (CPU) 101, a main memory 102, a BIOS-ROM 103, a networkcontroller 105, a peripheral interface controller 106, a controller 107,an embedded controller (EC) 108, etc.

The processor 101 is a CPU configured to control the operation of eachof the components of the information processing apparatus. The processor101 executes various programs loaded into the main memory 102 from anyone of SSDs 3. The main memory 102 constituted or a random-access memorysuch as a DRAM. Programs which are executed by the processor 101 includethe application software layer 41, the OS 42, and the file system 43described above. The file system 43 serves as the tier management module44 described above.

Further, the processor 101 also executes a basic input output system(BIOS) stored in the BIOS-ROM 103, which is a nonvolatile memory. TheBIOS is a system program for controlling hardware.

The network controller 105 is a communication device such as a wired LANcontroller and a wireless LAN controller. The peripheral interfacecontroller 106 is configured to execute communication with a peripheraldevice such as a USB device.

The controller 107 configured to execute communication with devicesconnected to connectors 107A, respectively. In the present embodiment,the SSDs 3 may be connected to the connectors 107A, respectively. Thecontroller 107 is, for example, a SAS expander, a PCIe switch, a PCIeexpander, a flash array controller, or a RAID controller.

The EC 108 functions as a system controller configured to execute powermanagement of the information processing apparatus. The EC 108 powersthe information processing apparatus on and off in accordance with anoperation of a power switch by the user. The EC 108 is realized as aprocessing circuit such as a one-chip microcontroller. A keyboardcontroller which controls an input device such as a keyboard (KB) may beincorporated into the EC 108.

In the information processing apparatus, the processor 101 executes theprocess as described below under the control of the host software (theapplication software layer 41, the OS 42, and the file system 43).

The processor 101 sends extended namespace management commands to theSSD 3, and creates namespace NS #1 (area 51) for hot data within the SSD3. The extended namespace management command includes a parameterindicative of the number of physical blocks which should be allocated tonamespace NS #1 (area 51) for hot data.

The processor 101 sends extended namespace management commands to theSSDs 3, and creates namespace NS #2 (area 52) for warm data within theSSD 3. The extended namespace management command includes a parameterindicative of the number of physical blocks which should be allocated tonamespace NS #2 (area 52) for warm data.

Similarly, the processor 101 sends extended namespace managementcommands to the SSDs 3, and creates namespace NS #n (area 55) for colddata within the SSD 3. The extended namespace management commandincludes a parameter indicative of the number of physical blocks whichshould be allocated to namespace NS #n (area 55) for cold data.

The processor 101 manages the namespace ID of namespace NS #1 as thenamespace ID for hot data, manages the namespace ID of namespace NS #2as the namespace ID for warm data, and manages the namespace ID ofnamespace NS #n as the namespace ID for cold data.

When it is necessary to write a certain kind of hot data to the SSD 3,the processor 101 sends write commands including the namespace ID ofnamespace NS #1 to the SSD. When it is necessary to write a certain kindof cold data to the SSD 3, the processor 101 sends write commandsincluding the namespace ID of namespace NS #n to the SSD.

FIG. 31 shows a configuration example of an information processingapparatus including a plurality of SSDs 3 and the host 2.

This information processing apparatus comprises a thin box-shapedhousing 201 which can be accommodated in a rack. A number of SSDs 3 maybe arranged within the housing 201. In this case, each of the SSDs 3 maybe removably inserted into a slot provided in a front surface 201A ofthe housing 201.

A system board (a motherboard) 202 is arranged inside the housing 201.On the system board (motherboard) 202, various electronic componentsincluding the CPU 101, the memory 102, the network controller 105, andthe controller 107 are mounted. These electronic components serve as thehost 2.

As described above, according to the present embodiment, a plurality ofnamespaces (areas 51 to 55) for storing a plurality of kinds of datahaving different update frequencies, respectively, are stored. Thecontroller 4 creates first encoded data by encoding write data by usinga first code for reducing wear of a memory cell, and creates secondencoded data which should be written to the NAND memory 5 by adding anerror correction code to the first encoded data. Further, the controller4 changes the ratio between the first encoded data and the errorcorrection code based on the namespace to which the write data should bewritten. Accordingly, a tradeoff between reliability (data retention)and endurance (DWPD value) can be optimized for each of the namespaces,and a memory system which is useful in storing various kinds of data canbe realized.

In the present embodiment, a NAND memory has been exemplified as anonvolatile memory. However, the function of the present embodiment canalso be applied to other various nonvolatile memories, such as amagnetoresitive random access memory (MRAM), a phase-change randomaccess memory (PRAM), a resistive random access memory (ReRAM), or aferroelectric random access memory (FeRAM).

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A memory system comprising: a nonvolatile memory;and a controller electrically connected to the nonvolatile memory andconfigured to: manage a plurality of areas of the nonvolatile memory,the areas including a first area for storing a first type of data and asecond area for storing a second type of data having a lower updatefrequency than the first type of data, encode write data by using firstcoding for reducing wear of a memory cell to generate first encodeddata, generate second encoded data by adding an error correction code tothe first encoded data, the second encoded data including the firstencoded data and the error correction code, and write the second encodeddata to one of the first area and the second area, wherein the firstencoded data corresponding to the first type has a first length and theerror correction code corresponding to the first type has a secondlength, and wherein the first encoded data corresponding to the secondtype has a third length less than the first length and the errorcorrection code corresponding to the second type has a fourth lengthgreater than the second length.
 2. The memory system of claim 1, whereinthe encoding the write data includes converting a first code in thewrite data into another code longer than the first code.
 3. The memorysystem of claim 1, wherein the controller is configured to compress thewrite data, and encode the compressed write data by using the firstcoding to generate the first encoded data.
 4. The memory system of claim3, wherein the first encoded data is longer than the compressed writedata.
 5. The memory system of claim 1, wherein the controller isconfigured to change a ratio between the first encoded data and theerror correction code based on an update frequency of the write data. 6.A memory system comprising: a nonvolatile memory; and a controllerelectrically connected to the nonvolatile memory and configured to:logically divide the nonvolatile memory into a plurality of areas, theareas including a first area for storing a first type of data and asecond area for storing a second type of data having a lower updatefrequency than the first type of data, encode write data by using firstcoding for reducing wear of a memory cell to generate first encodeddata, generate second encoded data by adding an error correction code tothe first encoded data, the second encoded data including the firstencoded data and the error correction code, and write the second encodeddata to one of the first area and the second area, wherein the firstencoded data corresponding to the first type has a first length and theerror correction code corresponding to the first type has a secondlength, and wherein the first encoded data corresponding to the secondtype has a third length less than the first length and the errorcorrection code corresponding to the second type has a fourth lengthgreater than the second length.
 7. The memory system of claim 6, whereinthe controller is configured to change a ratio between the first encodeddata and the error correction code based on an update frequency of thewrite data.
 8. A method of controlling a nonvolatile memory, the methodcomprising: managing a plurality of areas of the nonvolatile memory, theareas including a first area for storing a first type of data and asecond area for storing a second type of data having a lower updatefrequency than the first type of data; encoding write data by usingfirst coding for reducing wear of a memory cell to generate firstencoded data; generating second encoded data by adding an errorcorrection code to the first encoded data, the second encoded dataincluding the first encoded data and the error correction code; andwriting the second encoded data to one of the first area and the secondarea, wherein the first encoded data corresponding to the first type hasa first length and the error correction code corresponding to the firsttype has a second length, and wherein the first encoded datacorresponding to the second type has a third length less than the firstlength and the error correction code corresponding to the second typehas a fourth length greater than the second length.
 9. The method ofclaim 8, wherein the encoding the write data includes converting a firstcode in the write data into another code longer than the first code. 10.The method of claim 8, further comprising: compressing the write data,wherein the first encoded data is generated by encoding the compressedwrite data by using the first coding.
 11. The method of claim 10,wherein the first encoded data is longer than the compressed write data.12. The method of claim 8, further comprising: changing a ratio betweenthe first encoded data and the error correction code based on an updatefrequency of the write data.